import request from '@/utils/request.js'
/**
 * 获取频道文章
 * @param {Object} params
 */
export const getArtical = params => request({
  method: 'GET',
  url: '/v1_1/articles',
  params
})
/**
 * 获取全部频道列表
 * @param {*} data
 */
export const getAllChannels = data => request({
  method: 'GET',
  url: '/v1_0/channels'
})
/**
 * 批量修改用户频道列表
 * @param {*} data
 */
export const addMyChannels = data => request({
  method: 'PATCH',
  url: '/v1_0/user/channels',
  data: {
    channels: [data]
  }
})
/**
 * 删除指定用户频道
 * @param {*} channelId
 */
export const removeMyChannel = channelId => request({
  method: 'DELETE',
  url: '/v1_0/user/channels/' + channelId
})
